package com.generator.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 〈jbdc configuration〉
 * @author xsh
 * @create 2018/9/16
 * @since 1.0.0
 */
@Configuration
@ConfigurationProperties(prefix="generator.jdbc")
public class JDBCConfiguration {

    private String driverClass;

    private  String  url;

    private  String  username ;

    private String password ;

    private String db;

    public String getDriverClass() {
        return driverClass;
    }

    public void setDriverClass(String driverClass) {
        this.driverClass = driverClass;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDb() {
        return db;
    }

    public void setDb(String db) {
        this.db = db;
    }

    @Override
    public String toString() {
        return "JDBCConfigarution{" +
                "driverClass='" + getDriverClass() + '\'' +
                ", url='" + getUrl() + '\'' +
                ", username='" + getUsername() + '\'' +
                ", password='" + getPassword() + '\'' +
                ", db='" + getDb() + '\'' +
                '}';
    }
}